(function(win, doc) {
	if(!win.addEventListener) return;
	var html = document.documentElement;

	function setFont() {
		var cliWidth = html.clientWidth;
		html.style.fontSize = 100 * (cliWidth / 750) + 'px';
	}
	win.addEventListener('resize', setFont, false)
	doc.addEventListener('DOMContentLoaded', setFont, false)
})(window, document);

//用户手机号缓存

//var hosts = 'http://www.dabiotc.com'; //正常
var hosts = ' http://www.gdjd034.com'; //正常  （物链联）
var host = 'http://101.201.28.118:8080'; //股票
//http://192.168.1.214:8038新接口地址
//var host = 'http://192.168.1.232:8088';
var websock = "ws://101.201.28.118:8080"; //推送
//var host2 = "http://www.gdjd034.com"; //自己造的数据k线

var host2 = " http://www.gdjd034.com";
var chang = 'ws://www.gdjd034.com:7272';
//ws  http://www.gdjd034.com:7272
//涨跌幅计算公式
//涨跌幅 计算公式： （当前价格-开盘价格）/开盘价*100%
function applies(newPrice, openPrice) {
	return(((newPrice - openPrice) / openPrice) * 100).toFixed(4);
}

//行情k线图专用接口
var k_server = {
	hang: host + '/sexp/stock/getNewInfo', //行情列表
	line: host + '/sexp/stock/getGoodsInfo' //(minute/minute5/minute15/minute30/minute60/day)
}
//模拟数据专用接口
var k_server2 = {
	line: host2 + '/Home/test/index'
	//goodsType/minute/code/CAR-T
}

//正常接口
/*var server = {
	have_phone: hosts + '/index.php/Home/Index/check_mobile', //验证手机号是否存在
	register: hosts + '/index.php/Home/Index/check_reg', //注册验证
	check_code: hosts + '/index.php/Home/Index/check_code', //短语验证码验证接口
	code: hosts + '/index.php/Home/Duanxin/send_sms', //短信接口  type 1注册 2 重置 3 安全验证 4 支付密码设置 5 提币
	login: hosts + '/index.php/Home/Index/index', //登录
	reset_pwd: hosts + '/index.php/Home/Index/reset_pwd', //密码重置
	get_user: hosts + '/index.php/Home/Price/get_user', //获得个人信息
	bangding: hosts + '/index.php/Home/Price/binding_email', //邮箱绑定
	set_pwd: hosts + '/index.php/Home/Price/set_pwd', // 重置密码
	set_tpwd: hosts + '/index.php/Home/Price/set_tpwd', //设置支付密码
	add_url: hosts + '/index.php/Home/Price/add_url', //钱包地址增加接口
	url_list: hosts + '/index.php/Home/Price/url_list', //钱包地址列表接口
	set_name: hosts + '/index.php/Home/Index/set_name', //实名认证接口
	pingcang: hosts + "/index.php/Home/Order/pingcang", //手动平仓接口
	cancellations: hosts + "/index.php/Home/Order/cancellations", //撤单接口
	add_order: hosts + "/index.php/Home/Order/add_order", //下单接口
	tpwd: hosts + "/index.php/Home/Price/check_tpwd", //验证支付密码
	tongji: hosts + "/index.php/Home/Order/tongji", //持仓界面统计数据接口
	pingcang: hosts + "/index.php/Home/Order/pingcang", //手动平仓接口
	chicang: hosts + "/index.php/Home/Order/chicang", //持仓数据接口
	weituo: hosts + "/index.php/Home/Order/weituo", //委托数据接口
	chengjiao: hosts + "/index.php/Home/Order/chengjiao", //成交数据接口
	binding_email: hosts + "/index.php/Home/Price/binding_email", //绑定邮箱接口
	set_pwd: hosts + "/index.php/Home/Price/set_pwd", //修改密码
	del_url: hosts + "/index.php/Home/Price/del_url", //钱包地址删除
	fudong: hosts + '/index.php/Home/Index/setyk.html' //浮动计算
}
*/
var server = {
	register: hosts + '/home/api/register', //注册接口
	code: hosts + '/home/api/send_sms', //发送验证码接口   type 1注册 2 重置 3 安全验证 4 支付密码设置 5 提币
	have_phone: hosts + '/home/api/check_mobile', //验证手机号是否存在
	check_code: hosts + '/home/api/check_code', //短语验证码验证接口
	login: hosts + '/home/api/user_login', //登录
	reset_pwd: hosts + '/home/api/reset_pwd', //忘记密码
	user_info: hosts + '/home/api/user_info', //获取个人信息
	set_name: hosts + '/home/api/set_name', //实名认证接口
	set_tpwd: hosts + '/home/api/set_tpwd', //设置交易密码
	binding_email: hosts + '/home/api/binding_email', //邮箱绑定
	set_aut: hosts + "/home/api/set_aut", //    实名认证
	menu: hosts + '/home/api/public_data', //邮箱验证
	//	reset_tpwd: hosts +'/home/api/reset_tpwd',   //重置支付密码
	set_tpwd: hosts + '/home/api/set_tpwd', //设置交易密码
	reset_pwd1: hosts + '/home/api/reset_pwd1', //登录密码重设
	reset_tpwd: hosts + '/home/api/reset_tpwd', //支付密码重置   
	out: hosts + '/home/api/out', //退出登录
	newsList: hosts + '/home/api/NewsList', //资讯列表
	News: hosts + '/home/api/News', // 资讯详情
	NoticeList: hosts + '/home/api/NoticeList', //平台公告列表
	timeData: hosts + '/home/api/timeData', //五大微盘数据
	Notice: hosts + '/home/api/Notice', //平台公告详情
	crowd: hosts + '/home/api/crowd', //自选商品数据
	add_order: hosts + '/home/Order/add_order', //下单接口
	check_tpwd: hosts + '/home/api/check_tpwd', //验证交易密码正确性  tpwd，mobile
	chengjiao: hosts + '/Home/Order/chengjiao', //  成交数据接口  mobile
	weituo: hosts + '/Home/Order/weituo', //委托 mobile
	chicang: hosts + '/Home/Order/chicang', //持仓接口 
	tongji: hosts + '/Home/Order/tongji', //统计
	cancellations: hosts + '/Home/Order/cancellations', //撤单
	pingcang: hosts + "/Home/Order/pingcang", //平仓
	xq_crowd: hosts + "/Home/api/xq_crowd", //抢筹数量限制
	tj_rowd: hosts + '/Home/api/tj_crowd', //抢筹交易
	mx_crowd: hosts + '/Home/api/mx_crowd', //抢筹明细
	agree: hosts + '/Home/api/agree', //用户协议      type：'user'
	total_chengjiao: hosts + '/Home/Order/total_chengjiao', //总成交
	sign_in:hosts + '/Home/api/sign_in',   //签到接口
	imglink:hosts +'/Home/api/link',  //mobile    //图片链接
	asset:hosts + '/Home/api/asset'     //资产接口，参数mobile
}

//验证用户是不是登录 

function isLogin() {
	if(!sessionStorage.uid || !sessionStorage.phone) {
		//用户没有登录
		return false
	} else {
		return true;
	}
}
//请求个人信息函数
function get_userInfo(phone) {
	var datas = null;
	myajax({
		url: server.user_info,
		type: 'post',
		async: false,
		data: {
			mobile: phone
		},
		sfun: function(data) {
			//获取个人信息
			if(data.status == 200) {
				datas = data.data;
				sessionStorage.uid = data.data.account;
				sessionStorage.phone = data.data.mobile;
				sessionStorage.fenxiang = data.data.tgno;

			} else {
				mylayer('请重试!')
			}

		},
		efun: function(data) {

		}
	})
	return datas;
}
//弹框
function mylayer(option) {
	layer.open({
		content: option,
		skin: 'msg',
		time: 2 //2秒后自动关闭
	});
}
$(function() {
	//点击返回函数	
	$('#goback').on('click', function() {
		history.back(-1);
	})
})

//页面之间传值函数
function GetQueryString(name) {
	var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");
	var r = window.location.search.substr(1).match(reg);
	if(r != null) return decodeURI(r[2]);
	return null;
}

//倒计时函数
function setTime(dom, num, s) {
	var sethtml = ''
	set = setInterval(function() {
		num--;
		if(num < 0) {
			dom.attr('disabled', false);
			sethtml = '点击重新获得';
			clearInterval(set);
			dom.css('color', '#5786d2');
		} else {
			dom.attr('disabled', true);
			sethtml = num + '秒后重新发送';

			dom.css('color', '#8C9FAD');
		}
		dom.val(sethtml);

	}, s)
}

//点击添加下边线
function changelinecolor() {
	$('input').on('click', function() {
		for(var i = 0; i < $('input').length; i++) {
			$('input').css('borderBottom', '1px solid #e7ebee');
		}
		$(this).css('borderBottom', '1px solid #e86d43');
	})
}

function orshow(o) {
	/*
	 参数说明
	 dom_show : 数字显示 的input
	 dom_hidden: 数字隐藏的input 
	 obox_show: 数字显示input 外部的盒子
	 obox_hidden: 数字隐藏input外部的盒子
	 flat:此时的状态 1代表点击显示按钮 2代表显示隐藏按钮
	 * */
	if(o.flat == 1) { //表示是从显示切换到隐藏
		//获取显示的val值
		var val = o.dom_show.val();
		o.dom_hidden.val(val);
		//显示影藏  影藏显示
		o.obox_show.css('display', 'none');
		o.obox_hidden.css('display', 'block');

	} else {
		//		表示是从隐藏切换到显示
		var val = o.dom_hidden.val();
		o.dom_show.val(val);

		o.obox_show.css('display', 'block');
		o.obox_hidden.css('display', 'none');
	}

	return val;

}

//传一个手机号 返回手机号的前3位和后四位 其他的显示* (手机号加密)

function phoneEncryption(num) {
	//获得手机号的前3位
	var a = num.slice(0, 3);
	var b = num.slice(7);
	var ok = a + '****' + b;
	return ok;
}

//密码设置  显示隐藏

function change_show() {

	$('.hid1').on('click', function() {
		orshow({
			flat: 1,
			dom_show: $('#or'),
			dom_hidden: $('#or_hid'),
			obox_show: $('.or_pwd'),
			obox_hidden: $('.or_pwd_hid')

		})
		//		user_pwd.pwd = $(this).siblings('input').val();

	})

	$('.sho1').on('click', function() {
		orshow({
			flat: 2,
			dom_show: $('#or'),
			dom_hidden: $('#or_hid'),
			obox_show: $('.or_pwd'),
			obox_hidden: $('.or_pwd_hid')

		})
		//		user_pwd.pwd = $(this).siblings('input').val();

	})

	$('.hid').on('click', function() {
		orshow({
			flat: 1,
			dom_show: $('#show_pwd'),
			dom_hidden: $('#hid_pwd'),
			obox_show: $('.userpwd'),
			obox_hidden: $('.userpwd_hidden')

		})
		//		user_pwd.pwd = $(this).siblings('input').val();

	})
	$('.sho').on('click', function() {
		orshow({
			flat: 2,
			dom_show: $('#show_pwd'),
			dom_hidden: $('#hid_pwd'),
			obox_show: $('.userpwd'),
			obox_hidden: $('.userpwd_hidden')

		})
		//		user_pwd.pwd = $(this).siblings('input').val();

	})

	$('.hid_ag').on('click', function() {
		orshow({
			flat: 1,
			dom_show: $('#show_pwd_ag'),
			dom_hidden: $('#hid_pwd_ag'),
			obox_show: $('.userpwd_again'),
			obox_hidden: $('.userpwd_again_hidden')

		})
		//		user_pwd.pwd_ag = $(this).siblings('input').val();
	})

	$('.show_ag').on('click', function() {
		orshow({
			flat: 2,
			dom_show: $('#show_pwd_ag'),
			dom_hidden: $('#hid_pwd_ag'),
			obox_show: $('.userpwd_again'),
			obox_hidden: $('.userpwd_again_hidden')

		})
		//		user_pwd.pwd_ag = $(this).siblings('input').val();

	})
}

//页面跳转
function go(url, time) {
	setTimeout(function() {
		location.href = url;
	}, time)
}

//弹框
function layerOpen(content, fn) {
	layer.open({
		content: content,
		btn: ['是', '否'],
		yes: fn
	});
}

// ajax封装
function myajax(ev) {
	ev.type = ev.type == null ? 'post' : ev.type;
	ev.async = ev.async == null ? 'true' : ev.async;
	ev.dataType = ev.dataType == null ? 'json' : ev.dataType;
	$.ajax({
		url: ev.url,
		type: ev.type,
		contentType: "application/x-www-form-urlencoded",
		data: ev.data,
		async: ev.async,
		dataType: ev.dataType,
		success: function(result) {
			ev.sfun(result);
		},
		error: function(result) {
			ev.efun(result);
		}
	})
}

//时间撮转化为时间 函数
function changeTime(data) {
	var date = new Date(data);
	Y = date.getFullYear() + '/';
	M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '/';
	D = date.getDate() < 10? '0'+(date.getDate()):date.getDate();
	/*h = date.getHours() + ':';
	m = date.getMinutes() + ':';
	s = date.getSeconds();*/
	return Y + M + D;

}

function changeTime2(data) {
	var date = new Date(data);
	Y = date.getFullYear() + '-';
	M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '-';
	D = date.getDate() + ' ';
	h = ((date.getHours()) < 10 ? '0' + (date.getHours()) : (date.getHours())) + ':';
	m = ((date.getMinutes()) < 10 ? '0' + (date.getMinutes()) : (date.getMinutes())) + ':';
	s = (date.getSeconds()) < 10 ? '0' + date.getSeconds() : date.getSeconds();
	return Y + M + D + h + m + s;

}

function changeTime3(data) {
	var date = new Date(data);
	Y = date.getFullYear() + '-';
	M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '-';
	D = date.getDate() + ' ';
	//	h = date.getHours() +':';
	h = ((date.getHours()) < 10 ? '0' + (date.getHours()) : (date.getHours())) + ':';
	m = ((date.getMinutes()) < 10 ? '0' + (date.getMinutes()) : (date.getMinutes())) + ':';
	s = (date.getSeconds()) < 10 ? '0' + date.getSeconds() : date.getSeconds();
	return h + m + s;

}

//判断是不是数字
function isnum(num) {
	if(!num || isNaN(num)) {
		return false
	} else {
		return true;
	}
}

function model(msg) {
	layer.open({
		type: 2,
		content: msg
	});

}
//短息验证函数封装
/*
 mycode 用户输入的验证码
 mobile 用户手机号
 where 验证成功要跳转的页面
 dom 验证码输入框dom
 * */
function true_code(mycode, mobile, where, dom) {
	myajax({
		url: server.check_code,
		data: {
			code: mycode,
			mobile: mobile
		},
		sfun: function(data) {

			if(data.status == 200) {
				//去设置验证码
				mylayer(data.msg);
				go(where, 800);
			} else {
				mylayer(data.msg);
				dom.val('');
			}
		},
		efun: function() {}
	})
}

var jo = {};
(function(_) {
	var _uid = 0;
	_.uid = function() {
		return ++_uid
	}
	_.escape = function(string) {
		return('' + string).replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/"/g, '&quot;').replace(/'/g, '&#x27;').replace(/\//g, '&#x2F;');
	};
	var txnd = {};
	_._textNode = function(pid, s) {
		if(!(pid in txnd))
			txnd[pid] = [];
		txnd[pid].push(s);
		s = '<abbr id="jo_txnd' + txnd[pid].length + '">joO txnd</abbr>';
		return s;
	};
	_.template_end = function(pid) {
		var ps = txnd[pid],
			abbr;
		if(!ps || !ps.length) return;
		for(var i = 1, l = ps.length; i <= l; i++) {
			abbr = _.G('jo_txnd' + i);
			abbr.parentNode.replaceChild(
				document.createTextNode(ps[i - 1]), abbr);
		}
		abbr = ps = null;
		delete txnd[pid];
	};

	_.templateSettings = {
		evaluate: /{%([\s\S]+?)%}/g,
		interpolate: /{%=([\s\S]+?)%}/g,
		escape: /{%-([\s\S]+?)%}/g
	};

	_.template = function(str) {
		var pid = this.uid();
		var c = _.templateSettings;
		var tmpl = 'var __p=[],print=function(){__p.push.apply(__p,arguments);};' +
			'with(obj||{}){__p.push(\'' +
			str.replace(/\\/g, '\\\\')
			.replace(/'/g, "\\'")
			.replace(c.escape, function(match, code) {
				return "',jo._textNode(" + pid + "," + code.replace(/\\'/g, "'") + "),'";
			})
			.replace(c.interpolate, function(match, code) {
				return "'," + code.replace(/\\'/g, "'") + ",'";
			})
			.replace(c.evaluate || null, function(match, code) {
				return "');" + code.replace(/\\'/g, "'")
					.replace(/[\r\n\t]/g, ' ') + "__p.push('";
			})
			.replace(/\r/g, '\\r')
			.replace(/\n/g, '\\n')
			.replace(/\t/g, '\\t') +
			"');}return __p.join('');";
		var func = new Function('obj', tmpl);
		return [func, pid];
	};
	_.txnd = txnd; // 反正也不打算长久用，先暴露出来吧，方便调试
})(jo);
jo.taTpl = function(taSel, data, posSel) {
	if(!data) return;
	var html = taSel.html();
	html = jo.template(html)[0](data); // null 值会被 join 干掉

	if(posSel) {
		taSel.remove();
		taSel = posSel;
	}
	taSel.replaceWith(html);
};

jo.reTpl = function(taSel, data, posSel) {
	if(!data) return;
	var html = taSel.html();
	html = jo.template(html)[0](data);
	posSel.empty().append(html);
};

//推送js  行情
function tuisong() {

	var websocket;
	var domarray = [],
		codearray = [],
		jiagearray = [],
		fuduanarray = [];

	// 首先判断是否 支持 WebSocket
	if('WebSocket' in window) {
		websocket = new WebSocket(
			websock + "/sexp/sexp/webSocketServer?account=" + sessionStorage.phone);
	} else if('MozWebSocket' in window) {
		websocket = new MozWebSocket(
			websock + "/sexp/sexp/webSocketServer?account=" + sessionStorage.phone);
	} else {
		websocket = new SockJS(
			websock + "/sexp/sexp/sockjs/webSocketServer?account=" + sessionStorage.phone);
	}
	// 打开时
	websocket.onopen = function(evnt) {
		var msg = {
			type: "vb_okex"
		};
		// 发送消息
		websocket.send(JSON.stringify(msg));
		window.setTimeout(function() {
			var domarray = document.getElementsByClassName("gupian");
			for(var i = 0; i < domarray.length; i++) {
				codearray.push(domarray[i].getAttribute("data_code"));
				jiagearray.push(domarray[i].getElementsByTagName("span")[1]);
				fuduanarray.push(domarray[i].getElementsByTagName("span")[2]);
			}
		}, 100)

	};
	// 处理消息时
	websocket.onmessage = function(evnt) {
		var datanum = JSON.parse(evnt.data);
		for(var i = 0; i < codearray.length; i++) {
			if(datanum.code == codearray[i]) {
				jiagearray[i].innerHTML = (Number(datanum.price)).toFixed(4);
				if(datanum.change >= 0) {
					fuduanarray[i].innerHTML = datanum.changePercentage;
					fuduanarray[i].className = 'upcolor';
				} else {
					fuduanarray[i].innerHTML = datanum.changePercentage;
					fuduanarray[i].className = 'downcolor';
				}

			}
		}
		//渲染当前页面的价格
		/*if(datanum.code == mycode) {
			$('.price .inp_price').val(datanum.price);
			var all = Number($('.price .inp_price').val()) * Number($('#showArea').val());
			$('.all_price_num').html(all.toFixed(4));
		}*/
	};
}

function tuisong2() {
	var websocket;
	var name = [],
		priceData = [],
		fudongData = []

	if('WebSocket' in window) {
		websocket = new WebSocket(chang);
	} else if('MozWebSocket' in window) {
		websocket = new MozWebSocket(chang);
	} else {
		websocket = new SockJS(chang);
	}
	// 打开时
	websocket.onopen = function(evnt) {
		var msg = {
			type: "pong"
			//			code: 'CAR-T'
		};
		// 发送消息
		websocket.send(JSON.stringify(msg));
		setTimeout(function() {			
			var domData = document.getElementById('cont_timeData').children;
			for(var i = 0; i < domData.length; i++) {
				priceData.push(domData[i].getElementsByClassName('price')[0]);
				fudongData.push(domData[i].getElementsByTagName("span")[2]);
				name.push($(domData[i]).attr('data_code'));
			}

		}, 1000)
	};
	// 处理消息时
	websocket.onmessage = function(evnt) {
		var changeData = JSON.parse(evnt.data);
		for(var i = 0; i < name.length; i++) {
			if(name[i] == changeData.code) {
				priceData[i].innerHTML = Number(changeData.closePrice).toFixed(4);
				fudongData[i].innerHTML = changeData.changePercentage;
				if(changeData.change >= 0) {
					fudongData[i].className = 'upcolor';
				} else {
					fudongData[i].className = 'downcolor';
				}

			}
		}

	}
}
//k_line.html 推送
function tuisong3(flat) {
	var url = null;
	var type = {};
	if(flat == 1) {
		//表示是前五款币
		url = websock + "/sexp/sexp/webSocketServer?account=" + sessionStorage.phone;
		type = {
			type: "vb_okex"
		};
	} else {
		//表示是后五款
		url = chang
		type = {
			type: "pong",
			code: 'CAR-T'
		}
	}
	var websocket;
	var dom = {};
	var code = null;
	var domarray = [],
		codearray = [],
		jiagearray = [],
		fuduanarray = [];

	// 首先判断是否 支持 WebSocket
	if('WebSocket' in window) {
		websocket = new WebSocket(url);
	} else if('MozWebSocket' in window) {
		websocket = new MozWebSocket(url);
	}
	// 打开时
	websocket.onopen = function(evnt) {
		code = GetQueryString('code');
		var msg = type;
		// 发送消息
		websocket.send(JSON.stringify(msg));
		setTimeout(function() {
			dom = {
				price: $('#nowprice'),
				hight: $('#hight'),
				low: $('#low'),
				fudu: $('#fudu')
			}
		}, 1500)

	};
	// 处理消息时
	websocket.onmessage = function(evnt) {
		var fd = null;
		var datanum = JSON.parse(evnt.data);
		if(datanum.code == code) {
			dom.fudu.html(datanum.changePercentage);
			dom.price.html(Number(datanum.price).toFixed(4)); //当前价
			dom.hight.html(Number(datanum.high).toFixed(4)); //最高价
			dom.low.html(Number(datanum.low).toFixed(4)); //最低价
			if(datanum.change >= 0) {
				$('#nowprice,#fudu').addClass('upcolor').removeClass('downcolor');
			} else {
				$('#nowprice,#fudu').addClass('downcolor').removeClass('upcolor');
			}
		}

	};  
	websocket.onerror = function(evnt) {};
	websocket.onclose = function(evnt) {};

}


function tuisongs() {

	var websocket;
	var domarray = [],
		codearray = [],
		jiagearray = [],
		fuduanarray = [];

	// 首先判断是否 支持 WebSocket
	if('WebSocket' in window) {
		websocket = new WebSocket(chang);
	} else if('MozWebSocket' in window) {
		websocket = new MozWebSocket(chang);
	} else {
		websocket = new SockJS(chang);
	}
	// 打开时
	websocket.onopen = function(evnt) {
		var msg = {
			type: "vb_okex"
		};
		// 发送消息
		websocket.send(JSON.stringify(msg));
		window.setTimeout(function() {
			var domarray = document.getElementsByClassName("gupian");
			for(var i = 0; i < domarray.length; i++) {
				codearray.push(domarray[i].getAttribute("data_code"));
				jiagearray.push(domarray[i].getElementsByTagName("span")[1]);
				fuduanarray.push(domarray[i].getElementsByTagName("span")[2]);
			}
		}, 100)

	};
	// 处理消息时
	websocket.onmessage = function(evnt) {
		var datanum = JSON.parse(evnt.data);
		for(var i = 0; i < codearray.length; i++) {
			if(datanum.code == codearray[i]) {
				jiagearray[i].innerHTML = (Number(datanum.price)).toFixed(4);
				if(datanum.change >= 0) {
					fuduanarray[i].innerHTML = datanum.changePercentage;
					fuduanarray[i].className = 'upcolor';
				} else {
					fuduanarray[i].innerHTML = datanum.changePercentage;
					fuduanarray[i].className = 'downcolor';
				}

			}
		}
		//渲染当前页面的价格
		/*if(datanum.code == mycode) {
			$('.price .inp_price').val(datanum.price);
			var all = Number($('.price .inp_price').val()) * Number($('#showArea').val());
			$('.all_price_num').html(all.toFixed(4));
		}*/
	};
}